package com.group.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.multipart.MultipartFile;

import com.group.pojo.TbDevice;

public interface DeviceService {
    //通过设备服务号称查询设备id
	String getDeviceIdByDeviceServiceNumber(String deviceServiceNumber);
    //获得所有的设备信息
	List<TbDevice> query(TbDevice device);
	//根据设备名称片段查询设备信息
	List<TbDevice> getDeviceInfoByNameFragment(String nameFragment);
	//根据设备名称查询设备是否存在
	String checkDeviceName(String deviceName);
	//添加新的设备
	String saveNewDevice(TbDevice device, MultipartFile pictureFile, HttpServletRequest request);
	//通过设备id查询设备
	List<TbDevice> getDeviceById(String id);
	//修改设备信息
	Map<String, String> updateDevice(TbDevice device, MultipartFile pictureFile1, HttpServletRequest request);
	//根据设备id删除设备信息
	Map<String, String> deleteDeviceInfo(String[] deviceIds);
	//检查设备服务号是否存在
	String CheckdeviceServiceNumber(String deviceServiceNumber,String deviceName);
    //根据设备id查询设备名称
	String getdeviceNameById(String deviceId);
	//根据设备名称查询设备id
	public String getDeviceIdByName(String name);
	//修改设备时检查设备以及对应的服务号是否存在
	String updateCheckdeviceServiceNumber(String deviceServiceNumber, String deviceName,String id);
	
	
	Map<String, String> save(HttpServletRequest request, TbDevice device, MultipartFile deviceImg);
	Map<String, String> updateDeviceImg(TbDevice device, MultipartFile deviceImg);
	Map<String, String> update(TbDevice device);
}
